var path = require('path');
var node_modules = path.resolve(__dirname, 'node_modules');
var pathToReact = path.resolve(node_modules, 'react/dist/react.min.js')
//var HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
    /*entry: [
     //'webpack/hot/dev-server',
     //'webpack-dev-server/client?http://localhost:8080',
     path.resolve(__dirname, 'app/main.js')
     ],*/
    entry: {
        first: path.resolve(__dirname, 'app/main.js'),
        //"mui/usage": path.resolve(__dirname, 'app/mui/usage.cjsx')
    },
    resolve: {
        alias: {
            'react': pathToReact
        }
    },
    output: {
        path: path.resolve(__dirname, 'build'),
        //filename: 'bundle.js'
        filename: "[name].js"
    },
    module: {
        loaders: [{
            test: /\.jsx$/,
            loader: 'babel?stage=0!jsx'
        }, {
            test: /\.cjsx$/,
            loader: 'coffee!cjsx'
        }, {
            test: /\.css$/,
            loader: 'style!css'
        }, {
            test: /\.scss$/,
            loader: 'style!css!sass'
        }, {
            test: /\.(png|jpg)$/,
            loader: 'url?limit=25000'
        }],
        noParse: [pathToReact]
    }/*,
     plugins: [new HtmlWebpackPlugin({
     title: 'Hello My First Webpack1'
     })]*/
}
